#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

class QLabel;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actioncolor_triggered();

    void on_actiontriangle_triggered();

    void on_actionrectangle_triggered();

    void on_actionline_triggered();

    void on_actionopen_triggered();

    void on_actionsave_triggered();

    void on_actionrounded_rectangle_triggered();

    void on_actioncircle_triggered();

    void on_actionellipse_triggered();

    void on_actionfill_mode_triggered();

    void on_actionline_mode_triggered();

    void on_actionnew_triggered();

    void on_actionfill_with_border_mode_triggered();
    void on_actionpainting_triggered();

    void on_actionmodify_triggered();

    void on_actiondrag_triggered();

    void on_actionpolygon_triggered();

    void on_actionX_scale_triggered();

    void on_actionY_scale_triggered();

    void on_actioncurve_triggered();

protected:
    void closeEvent(QCloseEvent *event);

    void open();
    void save();
    bool saveFile(const QString &fileName);
    bool loadFile(const QString &fileName);

    void keyPressEvent(QKeyEvent *e);

private:
    Ui::MainWindow *ui;

    bool isUnsaved;
    QString curFile;
    QLabel *statusLabel;
    QLabel *permanent;
};

#endif // MAINWINDOW_H
